import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/mapi/customer/registerandlogin',
    method: 'post',
    data
  })
}
export function code(data) {
  return request({
    url: '/mapi/customer/validate',
    method: 'post',
    data
  })
}




export function getInfo() {
  return request({
    url: '/mapi/user/userInfo',
    method: 'get'
  
  })
}

export function logout(data) {
  return request({
    url: '/mapi/customer/logout',
    method: 'get',
    data
  })
}

export function addmerchant(data) {
  return request({
    url: '/mapi/customer/invoiceAddfast',
    method: 'post',
    data
  })
}
  export function addshop(data) {
    return request({
      url: '/mapi/customer/invoiceShopAddfast',
      method: 'post',
      data
    })
   
  }

  export function gettokens(data) {
    return request({
      url: '/api/getvideotoken',
      method: 'get',
      data
    })
  }

 
export function getvideoinfo(data) {
  return request({
    url: '/mapi/vedio/getShortVedio',
    method: 'get',
    params:data
  })
}
export function addshopvideo(data) {
  return request({
    url: '/mapi/vedio/addshopvideo',
    method: 'post',
    data
  })
}

export function updateshopvideo(data) {
  return request({
    url: '/mapi/vedio/updateshortvideo',
    method: 'post',
    data
  })
}


export function getitems(data) {
  return request({
    url: '/mapi/item/getItemByProvider',
    method: 'get',
    data
  })
}
export function additem(data) {
  return request({
    url: '/mapi/item/add',
    method: 'post',
    data
  })
}
export function gettags(data) {
  return request({
    url: '/mapi/panel/other/list',
    method: 'get',
    data
  })
}

export function getorders(data) {
  return request({
    url: '/mapi/customerOrder/list',
    method: 'get',
    params:data
  })
}
export function getvideolist(data) {
  return request({
    url: '/mapi/vedio/getShortVediolist',
    method: 'get',
    params:data
  })
}
export function getcards(data) {
  return request({
    url: '/mapi/customer/getcards',
    method: 'get',
    params:data
  })
}
export function addaddress(data) {
  return request({
    url: '/mapi/user/addaddress',
    method: 'post',
    data
  })
}
export function getalladdress(data) {
  return request({
    url: '/mapi/user/getalladdress',
    method: 'get',
    params:data
  })
}














export function getskunames(data) {
  return request({
    url: '/mapi/item/findpublicSpec',
    method: 'get',
    params:data
  })
}



// export function uploadwork(data) {
//   return request({
//     url: '/mapi/customer/uploadwork',
//     method: 'get',
//     params:data
//   })
// } 
